

public class SysConstant {
    public static final long TASK_TIMEOUT = 100000;

    public static String THRIFT_ADDR;
    public static int THRIFT_TIMEOUT = 5000;
    public static int THRIFT_PORT = 9978;
    public static int SESSION_TIMEOUT = 3600;

    public static class API_ERROR_CODE {
        public static final int RECEIVE_PACKAGE_OK = 1;
        public static final int THRIFT_SEND_UP_OK = 1;

        public static final int THRIFT_SEND_TASK_OK = 1;
        public static final int THRIFT_MSG_INVALID = 2;
        public static final int THRIFT_DEV_OFFLINE = 3;
        public static final int THRIFT_OPEN_ALREADY = 11;
        public static final int THRIFT_CLOSE_ALREADY = 12;

        public static final int API_WAIT_TASK = 0;
        public static final int API_PORT_ACTION_ERR = 4;
        public static final int API_TASK_TIMEOUT = 5;
        public static final int API_TASK_EXECUTE_SUCCESS = 6;
        public static final int API_ORDERID_NOT_EQ = 7;
        public static final int API_DEVICE_NO_FOUND = 8;
        public static final int API_ORRDER_NO_FOUND = 9;
        public static final int API_CTRL = 10;
    }


    public enum UNIQUENESS {
        ONLY_ONE(1), MULTIPLE(-1), ON_ONE(0);
        private final int code;

        private UNIQUENESS(int code) {
            this.code = code;
        }

        public int code() {
            return this.code;
        }
    }
}

